home *** CD-ROM | disk | FTP | other *** search
- //
- // MiscRtMatrix.h -- a wrapper around the RtMatrix structure.
- // Written by Thomas Engel Copyright (c) 1994 by Thomas Engel.
- // Version 1.0 All rights reserved.
- //
- // This notice may not be removed from this source code.
- //
- // This object is included in the MiscKit by permission from the author
- // and its use is governed by the MiscKit license, found in the file
- // "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- // for a list of all applicable permissions and restrictions.
- //
-
- // Note: This relies upon the 3dKit headers. As such, I have not included
- // it in the top level MiscKit header--so you will have to explicity import
- // this header to use this object!
-
- /* MiscRtMatrix.h
- *
- * PDO does not allow pasing RtMatrix by value. So this is a wrapper object.
- * Anyway. The object is the subject. More features than RtMatrix.
- *
- * Usage: Create an instance and init it with the right values.
- * You may pass this object bycopy with the (P)DO systems.
- *
- * Attention: When setting angles remember that they are in degree!
- * (like 0-360 or 720 I don't mind)
- *
- * Using the byTrans.byRot: does require some discipline! As you may
- * remember multiplying matrices is not comutative. Therefore you
- * MUST follow some rules when computing the a,b,c rotation. For more
- * details please read the comments included in the method implemen-
- * tation. ( The rotation will be applyed in the a-b-c order!)
- *
- * Notes: There are many more possible methods. They are yet to come.
- * When working with the 3DDeviceServer you MUST use this object in
- * your app.
- * You will get BYCOPY instances!!
- *
- * Written by: Thomas Engel
- * Created: 13.04.1994 (Copyleft)
- * Last modified: 16.04.1994
- */
-
- #import <appkit/appkit.h>
- #import <3Dkit/3Dkit.h>
-
- @interface MiscRtMatrix:Object <NXTransport>
- {
- RtMatrix m;
- }
-
- - setByTranslation:(float)x :(float)y :(float)z
- andRotation:(float)a :(float)b :(float)c;
-
- - setTransformMatrix:(RtMatrix)newTransform;
- - getTransformMatrix:(RtMatrix)theMatrix;
- - getTranslateMatrix:(RtMatrix)theMatrix;
- - getRotateMatrix:(RtMatrix)theMatrix;
-
- - (BOOL)doesRotate;
- - (BOOL)doesTranslate;
- - (BOOL)doesScale;
-
- @end
-
- /*
- * History: 16.04.04 Using a RtMatrix internally now.
- *
- * 13.04.94 First test and it works. Well PDO is not perfect (no
- * RtMatrix by value) but it is easy when working with
- * real objects.
- *
- *
- * Bugs: - doesScale not implemented.
- *
- * - applys only one Rotation :-( I will change that soon.
- */
-